﻿using System.Net;

namespace Tiscs.Practices.Web.Services.Client
{
    /// <summary>
    /// 客户端Cookie容器管理器。实现全局单例Cookie容器。
    /// </summary>
    public static class CookieContainerManager
    {
        private static CookieContainer _cookieContainer;

        /// <summary>
        /// 全局单例Cookie容器。
        /// </summary>
        public static CookieContainer CookieContainer
        {
            get
            {
                if (_cookieContainer == null)
                {
                    _cookieContainer = new CookieContainer();
                }
                return _cookieContainer;
            }
        }
    }
}
